<template>
  <div class="about">
    <h1 ref="hDom" v-on:click="handleSubmit">{{list}}</h1>




  </div>
</template>

<script>
// vue2.0
import HelloWorld from '@/components/HelloWorld'
import { mapState } from 'vuex'
import EventBus from '../eventBus/index'

export default {
  components: {
    HelloWorld,
  },
  data () { // 函数形式：data为什么用函数
    return {
     list: 'About组件'
    }
  },
  mounted() {
    console.log('',this.$refs.hDom)
    // this.$refs.hDom.innerHTML = ''
    this.list = '我是更改后的About组件信息'

    this.$nextTick().then(res => {
      console.log('', this.$refs.hDom.innerHTML)
    })

    // this.$nextTick(() => {
    //
    // })




    // EventBus.$on('toAbout', (msg) => {
    //   console.log('msg-----ABout',msg)
    // })
  },
  computed:{
    // ...mapState(['msg'])
  },
  methods: {

  }
}
</script>
<style lang="scss">

</style>
